#!/usr/bin/python
# -*- coding: utf-8 -*-

from flask_restful import Resource
from flask         import redirect,request,make_response

from e4ting.util   import Hardware

class WebIndexInfo(Resource):
    ''' 首页数据 '''
    #----------------------------------------------------------------------
    def __init__(self):
        super(WebIndexInfo, self).__init__()

    def get(self, **kwargs):
        # data = Hardware().cpu()
        # return dict(code=200, data=data)
        return {
            "resultCode": 200,
            "message": "SUCCESS",
            "data": {
                "carousels": [
                    {
                        "carouselUrl": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/banner-mate60.png",
                        "redirectUrl": "https://juejin.im/book/6844733826191589390"
                    },
                    {
                        "carouselUrl": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/banner-matex5.png",
                        "redirectUrl": "https://juejin.im/book/6844733826191589390"
                    },
                    {
                        "carouselUrl": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/banner-p60-pro-white.png",
                        "redirectUrl": "https://juejin.im/book/6844733826191589390"
                    }
                ],
                "hotGoodses": [
                    {
                        "goodsId": 10933,
                        "goodsName": "【CVE-2020-6507】V8引擎漏洞Chrome远程代码执行0Day漏洞利用学习。",
                        "goodsIntro": "https://mp.weixin.qq.com/s?__biz=MzI1NDc4NjA2NQ==&mid=2247483950&idx=1&sn=12a0f9fad632d111b3d937a53ea3ce72&chksm=ea3ead50dd492446e9a9d7ea521b45e438f0af902038de8b3fadc6f3314031451bc49df793a8#rd",
                        "goodsCoverImg": "https://img.e4ting.cn/files/upload/cb658a580cb575412e66a8b78816bd8d/chrome.svg",
                        "sellingPrice": "微信公众号",
                        "type": "link",
                        "tag": "文章"
                    },
                    {
                        "goodsId": 10931,
                        "goodsName": "【CVE-2023-38545】麒麟上复现curl漏洞CVE-2023-38545",
                        "goodsIntro": "https://mp.weixin.qq.com/s?__biz=MzI1NDc4NjA2NQ==&mid=2247483960&idx=1&sn=1eda547a06ae4ebc7cb32595578633c0&chksm=ea3ead46dd49245031ca33180286ffa7e46768f7d45219545073ad4049de2658cc7dda0b7d9d#rd",
                        "goodsCoverImg": "https://img.e4ting.cn/files/upload/7c086f6854a5141714dbe55f457fd178/curl.jpg",
                        "sellingPrice": "微信公众号",
                        "type": "link",
                        "tag": "文章"
                    }
                    # {
                    #     "goodsId": 10918,
                    #     "goodsName": "Apple AirPods (第三代)",
                    #     "goodsIntro": "AirPods第三代搭载空间音频和自适应均衡...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/MME73_AV4_GEO_CN.jpeg",
                    #     "sellingPrice": 1399,
                    #     "tag": "美妙新声"
                    # },
                    # {
                    #     "goodsId": 10908,
                    #     "goodsName": "HUAWEI Mate 40 Pro 全网通5G手机 8GB...",
                    #     "goodsIntro": "5nm麒麟9000旗舰芯片 | 超感光徕卡电...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/mate40-white.png",
                    #     "sellingPrice": 6488,
                    #     "tag": "跃见非凡"
                    # },
                    # {
                    #     "goodsId": 10906,
                    #     "goodsName": "Apple iPhone12 Pro (A2408) 128...",
                    #     "goodsIntro": "A14仿生芯片，6.1英寸超视网膜XDR显示...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/iphone-12-pro-blue-hero.png",
                    #     "sellingPrice": 8499,
                    #     "tag": "自我再飞跃"
                    # },
                    # {
                    #     "goodsId": 10902,
                    #     "goodsName": "华为 HUAWEI P40 冰霜银 全网通5G手机",
                    #     "goodsIntro": "麒麟990 5G SoC芯片 5000万超感...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/p40-silver.png",
                    #     "sellingPrice": 4299,
                    #     "tag": "超感知影像"
                    # },
                    # {
                    #     "goodsId": 10932,
                    #     "goodsName": "华为Mate50 Pro 昆仑霞光 512G",
                    #     "goodsIntro": "曲面屏超光变XMAGE影像鸿蒙3.0拍照摄影...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/mate-50-pro-light.png",
                    #     "sellingPrice": 7899,
                    #     "tag": "领势而上"
                    # },
                    # {
                    #     "goodsId": 10934,
                    #     "goodsName": "Apple MacBook Pro 13英寸 16G+512...",
                    #     "goodsIntro": "m2 芯片 8核中央处理器 10核图形处理器",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/mbp-m2-202206.jpg",
                    #     "sellingPrice": 10799,
                    #     "tag": "超机动，硬实力"
                    # },
                    # {
                    #     "goodsId": 10921,
                    #     "goodsName": "HUAWEI P50 Pro 4G全网通 8GB+512GB...",
                    #     "goodsIntro": "麒麟9000芯片,万象双环设计",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/p50-gold.png",
                    #     "sellingPrice": 7488,
                    #     "tag": "万象新生"
                    # },
                    # {
                    #     "goodsId": 10937,
                    #     "goodsName": "iPhone 14 Pro 金色 512G",
                    #     "goodsIntro": "A16仿生芯片，4800万像素主摄，超瓷晶面...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/iphone-14-pro-gold.jpg",
                    #     "sellingPrice": 10599,
                    #     "tag": "强力出圈"
                    # },
                    # {
                    #     "goodsId": 10927,
                    #     "goodsName": "HUAWEI MatePad Pro 12.6英寸",
                    #     "goodsIntro": "8+256GB WIFI曜石灰 麒麟9000...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/matepad-pro.png",
                    #     "sellingPrice": 4699,
                    #     "tag": "创造无界"
                    # },
                    # {
                    #     "goodsId": 10920,
                    #     "goodsName": "MacBook Pro 16英寸 M1 Pro芯片",
                    #     "goodsIntro": "16G 512G 银色。M1Pro和M1Ma...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/mbp16-silver-select-202110_GEO_CN.jpeg",
                    #     "sellingPrice": 18999,
                    #     "tag": "强者的强"
                    # },
                    # {
                    #     "goodsId": 10929,
                    #     "goodsName": "华为 HUAWEI Sound X 2021",
                    #     "goodsIntro": "智能音箱幻彩光随声动",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/soundx.png",
                    #     "sellingPrice": 2199,
                    #     "tag": "声声出色"
                    # },
                    # {
                    #     "goodsId": 10928,
                    #     "goodsName": "HUAWEI WATCH 3 Pro智能手表",
                    #     "goodsIntro": "运动智能手表 尊享款 eSIM独立通话强劲续...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/watch-3-pro.png",
                    #     "sellingPrice": 3899,
                    #     "tag": "一表万象"
                    # },
                    # {
                    #     "goodsId": 10233,
                    #     "goodsName": "纪梵希高定香榭天鹅绒唇膏306#",
                    #     "goodsIntro": "(小羊皮口红 法式红 雾面哑光 持久锁色）新...",
                    #     "goodsCoverImg": "/goods-img/04949c0e-87df-445b-96dd-29e7fc69f734.jpg",
                    #     "sellingPrice": 355,
                    #     "tag": "雾面哑光 持久锁色"
                    # },
                    # {
                    #     "goodsId": 10907,
                    #     "goodsName": "HUAWEI Mate 40 Pro 全网通5G手机 8GB...",
                    #     "goodsIntro": "5nm麒麟9000旗舰芯片 | 超感光徕卡电...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/mate40-silver.png",
                    #     "sellingPrice": 6488,
                    #     "tag": "跃见非凡"
                    # },

                ],
                "newGoodses": [
                    # {
                    #     "goodsId": 10154,
                    #     "goodsName": "无印良品 MUJI 塑料浴室座椅",
                    #     "goodsIntro": "原色",
                    #     "goodsCoverImg": "/goods-img/15395057-94e9-4545-a8ee-8aee025f40c5.jpg",
                    #     "sellingPrice": 85,
                    #     "tag": "无印良品"
                    # }
                ],
                "recommendGoodses": [
                    # {
                    #     "goodsId": 10922,
                    #     "goodsName": "HUAWEI P50 雪域白",
                    #     "goodsIntro": "骁龙888,4G全网通,原色双影像单元,万象...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/p50-white.png",
                    #     "sellingPrice": 4488,
                    #     "tag": "万象新生"
                    # },
                    # {
                    #     "goodsId": 10930,
                    #     "goodsName": "华为FreeBuds Pro无线耳机",
                    #     "goodsIntro": "主动降噪真无线蓝牙耳机/入耳式耳机/环境音/...",
                    #     "goodsCoverImg": "https://newbee-mall.oss-cn-beijing.aliyuncs.com/images/freebuds-pro.png",
                    #     "sellingPrice": 749,
                    #     "tag": "动态降噪 听我想听"
                    # }
                ]
            }
        }


